/*
   Copyright (C) 2011 Roman Belov <romblv@gmail.com>

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _H_LINK_
#define _H_LINK_

#include "util/list.h"

typedef struct link_node link_node_t;

struct link_node {
	list_node_t		_node;
	void			*pl;		/* payload */
};

inline link_node_t *
link_node_alloc(void *pl)
{
	struct link_node	*lk;

	lk = malloc(sizeof(link_node_t));
	lk->pl = pl;

	return lk;
}

inline void
link_node_free(link_node_t *lk)
{
	free(lk);
}

#endif /* _H_LINK_ */

